import { RouteRecordRaw } from 'vue-router'

import { redirectPath } from '../help'

const routes: Array<RouteRecordRaw> = [
  {
    path: '/admin/data-manage',
    component: () => import('@/views/admin/data-manage/index.vue'),
    meta: { title: '数据管理', auth: ['admin-data-manage-list'] },
    redirect: redirectPath,
    children: [
      {
        path: '/admin/data-manage/list',
        component: () => import('@/views/admin/data-manage/list/index.vue'),
        meta: { title: '数据列表', auth: ['admin-data-manage-list'] },
        children: []
      },
      {
        path: '/admin/data-manage/details-list',
        component: () => import('@/views/admin/data-manage/details-list/index.vue'),
        meta: { title: '数据详情', auth: ['admin-data-manage-list'] }
      }
    ]
  }
]

export default routes
